//---------------------------------------------------------------------------

#ifndef WeightLogH
#define WeightLogH

#include "Business.h"
//---------------------------------------------------------------------------
class LogFile;


class TWetLogger:public CBusiness
{
  public:
      static  TWetLogger* GetInstance();
      static  free();
      virtual ~TWetLogger();
      void EnableAck(bool ackFlag);
      virtual int  PraseFrame(TCommunication* comm,UINT8* packetBuf, UINT32 len);

  private:
      int  DataComplete(TCommunication* comm);
      void Disposal(TCommunication* commu,UINT8* packetBuf, UINT32 len);
      bool IsValid(UINT8* packetBuf, UINT32 len);
      UINT8 CheckSum(UINT8* packetBuf, UINT32 len);
      void  SendRetCode(TCommunication* commu);
      
      TWetLogger();
      static TWetLogger* m_wetObj;
      UINT8 RetBuf[16];
      TFileStream* flstrem;
      LogFile *log;
      bool isAck;
};
#endif
